import log4js from 'log4js'
log4js.configure({
    appenders: {
		console:{ type: 'console' },
		file:{ 
			type: 'file', 
			filename: 'logs/file.log', 
			category: 'normal',
			maxLogSize: 104800,
			backups: 100
		},
		date:{ 
			type: 'dateFile', 
			filename: 'logs/date/', 
			category: 'normal',
			alwaysIncludePattern: true,
			pattern: "-yyyy-MM-dd-hh.log",
		}
    },
	categories: {

		default: {
			appenders: ['console', 'file', 'date'], 
			level: 'info',
		}

	}
});

const logger = log4js.getLogger('cheese');

export default logger